// 共享类型定义

// 功能标签页枚举
#[derive(PartialEq, Clone)]
pub enum FeatureTab {
    // HTML解析器相关功能
    HtmlParser,
    DomManipulation,
    CssSelector,
    Validation,
    HtmlSerialization,
    FormProcessing,
    AriaSupport,
    DomTraversal,
    LinkExtractor,
    HtmlCleaner,
    SvgSupport,
    MathMLSupport,

    // CSS解析器相关功能
    CssParser,
    SelectorParser,
    StyleComputation,
    MediaQuery,
    CssAnimation,

    // 布局引擎相关功能
    BoxModel,
    FlexLayout,
    GridLayout,
    Positioning,

    // 渲染引擎相关功能
    Rendering,
    TextRendering,
    ImageRendering,

    // 网络模块相关功能
    HttpClient,
    CookieManager,

    // JavaScript相关功能
    JsInteraction,
    DomEvents,

    // 用户界面相关功能
    UiComponents,
}

impl Default for FeatureTab {
    fn default() -> Self {
        FeatureTab::HtmlParser
    }
}

// HTTP方法枚举
#[derive(PartialEq, Clone)]
pub enum HttpMethod {
    Get,
    Post,
    Put,
    Delete,
    Patch,
    Options,
    Head,
}

impl Default for HttpMethod {
    fn default() -> Self {
        HttpMethod::Get
    }
}

// 功能分类枚举
#[derive(PartialEq, Clone)]
pub enum FeatureCategory {
    HtmlParser,
    CssParser,
    LayoutEngine,
    RenderingEngine,
    Network,
    JavaScript,
    UserInterface,
}

impl Default for FeatureCategory {
    fn default() -> Self {
        FeatureCategory::HtmlParser
    }
}